"""Reusable exceptions in the Master."""


class NodeError(Exception):
    """A generic exception relating to a node"""
    pass


class NodeConnectionError(Exception):
    """An exception for when there is a connection error relating to a node"""


class UnspecifiedNodeError(NodeError):
    """An error was specified in a node response"""
    pass


class NoFilesOpenedError(NodeError):
    """Action failed because no files are open."""
    pass


class SessionError(Exception):
    """A generic exception relating to sessions"""
    pass


class SessionLimitReached(SessionError):
    """The given IP address has reached the session limit and a new
    session will not be made"""


